Home:ALL Converter>How to concatenate string and put it to buttons C# Unity

How to concatenate string and put it to buttons C# Unity

Ask Time:2019-04-14T14:22:16         Author:user9804443

Json Formatter

I'm currently working on a puzzle word game and kind of having a hard time implementing an endless mode

Here's an image for your reference

enter image description here

The one that is encircled in blue the code for that is this

textComp.text = "";

rowsToReadFrom[0] = indexx;
textArray = myTextAsset.text.Split('\n').ToList();
textComp.text += textArray[rowsToReadFrom[0]] + "\n";

indexx += 1;

And the one that is encircled in red is the one that I wanted and the code for that is this

char[] chars = words[index].GetString().ToCharArray();
        foreach (char c in chars)
        {
            testObject clone = Instantiate(prefab.gameObject).GetComponent<testObject>();
            clone.transform.SetParent(container);

            charObjects.Add(clone.Init(c));
        }

Could someone please point me out what should I do.

Author:user9804443,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/55672517/how-to-concatenate-string-and-put-it-to-buttons-c-sharp-unity
yy